1. Technology Field
The present invention generally relates to a data accessing method, and more particularly, to a data accessing method which can prevent a host from reading garbled codes, and a flash memory storage system and a controller using the same.
2. Description of Related Art
Along with the widespread of digital cameras, camera phones, and MP3 in recently years, the consumers' demand to storage media has increased drastically too. Flash memory is one of the most adaptable memories for such battery-powered portable products due to its characteristics such as data non-volatility, low power consumption, small volume, and non-mechanical structure. A memory card is a storage device which uses a NAND flash memory as its storage medium. Memory card has been broadly adopted for storing personal data due to its small volume, large storage capacity, and high portability. Thereby, flash memory has become one of the most focused electronic products in recent years.
Conventionally, the firmware executed by a controller of a flash memory storage system is stored in a programmable read-only memory (PROM) of the controller, and the firmware is loaded into a static random access memory (SRAM) of the controller to be executed during the operation of the flash memory storage system. In order to reduce the size of the storage device and update/modify the firmware conveniently, a technique for directly storing the firmware in a flash memory of a flash memory storage system and loading the firmware into the controller only when the controller is about to work has been developed. According to this technique, a data perturbation module (or an encoding module) is usually implemented and a data is encoded into a garbled code before it is transmitted to the flash memory. Besides, after the data is read from the flash memory, the data is decoded to restore the original data. As described above, the security of the firmware or other important data transmitted between the controller and the flash memory is protected.
However, a card activation process has to be performed to a new flash memory in a flash memory storage device when the flash memory storage device is just manufactured, wherein the card activation process is to initialize each new block in the flash memory (i.e., setting the data at each page address in each block to be 0×FF). In particular, this initialization action is not a write command and accordingly the data is not encoded by the data perturbation module. However, when an end-user system issues a read command to a new block in the new flash memory storage device, the data 0×FF stored in the new block is decoded by the data perturbation module and accordingly the end-user system receives an unrecognizable garbled code. Accordingly, a data accessing method which can prevent a host from reading garbled code from a flash memory storage device having a data perturbation module is required.